Some people want to have a special layout for float pages (pages only
containing floats). As these pages
are generated autonomically by , the user doesn't have any control
over them. There is no \thispagestyle
for float pages and any change
of the page style will at least also affect the page before the float page.
With fancyheadings you can give the following definition in your
preamble5:
\makeatletter \def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi} \makeatother
In each of the header- or footer fields you can now specify
\iffloatpage{
value for float page}{
value for other pages}
You can even use this to get rid of the decorative line on float pages only by defining:
\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
Note that \renewcommand
is used rather than the usual
\setlength
command to change the \headrulewidth
. Changing it
with \setlength
will not work6.
After this \renewcommand
it will no longer be possible to change the
parameter \headrulewidth
with \setlength
, you will have to use
\renewcommand
in the rest of the document.
Sometimes you may want to change the layout also for pages that contain a float on the top of the page or a float on the bottom of the page.
Enter the following definitions in a style file (or between
\makeatletter
and \makeatother
in your preamble:
\let\latex@makecol\@makecol \def\@makecol{\let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol} \def\iftopfloat#1#2{\ifx\topfloat\empty #2\else #1\fi} \def\ifbotfloat#1#2{\ifx\botfloat\empty #2\else #1\fi}
You can then use the commands \iftopfloat
and \ifbotfloat
similar to
\iffloatpage
.
Note: Marks in floats will not be visible in 's output routine, so it is not useful to put marks in floats. So there is currently no way to let a float (e.g. a figure caption) influence the page header or footer.